home *** CD-ROM | disk | FTP | other *** search
/ MacWorld: Super Stacks! / Macworld CD.iso / HyperCard Archives / International / French v1.2.5.1 / Piles d'idées / Ventes / card_4211.txt < prev    next >
Text File  |  1989-02-20  |  2KB  |  81 lines

  1. -- card: 4211 from stack: in
  2. -- bmap block id: 4031
  3. -- flags: 0000
  4. -- background id: 2620
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A002
  11. -- rect: left=431 top=276 right=300 bottom=510
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Mise à jour
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   put the userLevel into saveLevel
  23.   if the userLevel < 3 then set userLevel to 3 -- "Dessin"
  24.   if the userLevel < 3 then exit mouseUp
  25.   clearScreen
  26.   put empty into background field "total"
  27.   reset paint
  28.   choose oval tool
  29.   set lineSize to 2
  30.   set filled to true
  31.  
  32.   put frameLeft() into horiz
  33.   put maxLine(field "Donn√©es") into valeurMaxi
  34.   set cursor to 4 -- montre
  35.  
  36.   put the number of lines in field "Donn√©es" into pi√®ces
  37.   if pi√®ces > 10 then
  38.     answer "Seules les 10 premi√®res donn√©es seront repr√©sent√©es." with "OK"
  39.     put 10 into pi√®ces
  40.   end if
  41.  
  42.   repeat with i = 1 to pi√®ces
  43.     get line i of field "Donn√©es"
  44.     if it is not empty then
  45.       put round(frameHeight()/8.2 * it/valeurMaxi) into compteurPi√®ces
  46.       set pattern to 13
  47.       drawcoins horiz,frameBottom()-2,compteurPi√®ces
  48.     end if
  49.     add 40 to horiz
  50.   end repeat
  51.   reset paint
  52.   choose browse tool
  53.   set userLevel to saveLevel
  54. end mouseUp
  55.  
  56. on drawCoins gauche,bas,combien
  57.   put bas into y
  58.   repeat with i = 1 to combien
  59.     subtract 8 from y
  60.     drag from gauche,y to gauche+30,y+10
  61.   end repeat
  62. end drawCoins
  63.  
  64.  
  65.  
  66. -- part contents for background part 5
  67. ----- text -----
  68. 6
  69. 13
  70. 15
  71. 15
  72. 17
  73. 22
  74. 25
  75. 34
  76. 50
  77. 60
  78.  
  79. -- part contents for background part 11
  80. ----- text -----
  81. St√© BOL : b√©n√©fice annuel